using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using Nekonya.UI;
using TinaX;
using TinaX.UIKit;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace Nekonya.Managers
{
    public class GameModeManager : IGameModeManager
    {
        [Inject]
        public IUIKit UIKit { get; set; }


        /// <summary>
        /// 进入游戏房间
        /// </summary>
        /// <returns></returns>
        public async Task EnterGameRootAsync()
        {
            //加载游戏房间主UI
            await UIKit.OpenUIAsync("gameRoom.MainScreen", new GameMainScreen());

            //切场景
            if (!SceneManager.GetActiveScene().name.Equals("Game.MainScene"))
                SceneManager.LoadScene("Game.MainScene");
        }
    }
}
